<template>
    <div class="index clearafter">
        <module-head></module-head>
        <div class="content flex">
            <div class="w220">
                <menu-list></menu-list>
            </div>
            <div class="w980 flex_full">
              <p class="flex flex_vcenter pdb20">
                <i class="titleTag"></i>
                <span class="fRedBig">会员管理</span>
              </p>
              <common-box2>
                <div class="memberlist bg">
                <form class="cbafter" id="search" v-on:submit.prevent="searchmethod">
                  <div class="fl">
                    <label for="">会员姓名：</label>
                    <input type="text" class="form-control" placeholder="" v-model="search.searchformdata.name">
                    <label for="">证件号码：</label>
                    <input type="text" class="form-control" placeholder="" v-model="search.searchformdata.idcard">
                    <label for="">手机号码：</label>
                    <input type="text" class="form-control" placeholder="" v-model="search.searchformdata.mobile">
                    <label for="">会员性别：</label>
                    <select class="form-control" v-model="search.searchformdata.sex">
                      <option value="">请选择</option>
                      <option v-for="item in dictionary.gender" value="{{item.key}}">{{item.text}}</option>
                    </select>
                    <label for="">会员类型：</label>
                    <select class="form-control" v-model="search.searchformdata.memberType">
                      <option value="">请选择</option>
                      <option v-for="item in  search.memberTypes" :value="item.memberType">{{item.memberName}}</option>
                    </select>
                    <label for="">疾病种类：</label>
                    <select class="form-control" v-model="search.searchformdata.chronic">
                      <option value="">请选择</option>
                      <option v-for="item in  search.commonChronics" :value="item.chronic">{{item.chronicText}}</option>
                    </select>
                    <div class="form-group" id="zhuguanyis">
                      <label for="">主管医生：</label>
                      <input type="hidden" class="form-control" placeholder="" v-model="search.searchformdata.mainDoctor">
                      <input type="text" class="form-control" v-model="search.searchformdata.mainDoctorname">
                      <div class="yishenglist">
                        <p @click="mayclick()">清空搜索内容</p>
                        <p @click="mayclick(item,$event)" v-for="item in  search.mainDoctor | filterBy search.searchformdata.mainDoctorname in 'doctorName'">{{item.doctorName}}</p>
                      </div>
                    </div>
                    <label for="">健康顾问：</label>
                    <select class="form-control" v-model="search.searchformdata.healthDoctor">
                      <option value="">请选择</option>
                      <option v-for="item in  search.healthDoctor" :value="item.doctorId">{{item.doctorName}}</option>
                    </select>
                  </div>
                  <div class="fr">
                    <button class="longBtn" type="submit">查 询</button>
                  </div>
                </form>
                </div>
              </common-box2>
              <div class="mt20"></div>
              <common-box2>
                <div class="memberlist bg">
                  <table class="table table-hover" id="memberlist" v-show="!search.issearchlist">
                    <tr v-for="item in tableList">
                      <td><img :src="headimg"></td>
                      <td>
                        <p><span class="name">{{item.person.personName}}</span><span>{{item.person.sexText}}</span><span class="age">{{item.person.dob}}岁</span><span class="iphone">{{item.person.phoneNo}}</span></p>
                        <p>
                          <span class="doctor" v-for="doc in item.mainDoctorList">{{doc.name}}：{{doc.levelText}}</span>
                          <span class="doctor" v-for="doc in item.healthDoctor">健康顾问：{{doc.name}}</span>
                        </p>
                        <p>
                          <button type="button" class="btn btn-default vip">
                            <span v-for="member in item.memberList.typeList">{{member.memberName}}</span>
                          </button>
                          <button type="button" class="btn btn-default" v-for="chr in item.commonChronicList">{{chr.chronicText}}</button>
                        </p>
                      </td>
                      <td class="operationtd">
                        <div class="infoedit" @click="edit_member(item)" v-if="(htmlmoduleobj.infoedit && item.ishow)||item.ishow3">会员信息修改</div>
                        <div @click="changedoc(item)" class="comment" v-if="htmlmoduleobj.changedoc">更换主管医生</div>
                        <div @click="add_mdisease(item)" class="comment" v-if="htmlmoduleobj.addmb">新增慢病病种</div>
                        <div class="fucha" v-if="htmlmoduleobj.fucha && item.ishow" @click="reviewvisit(item)">复查及复诊</div>
                        <div class="heart" @click="selftest(item)" v-if="htmlmoduleobj.selftest">自测指标</div>
                        <div class="comment" @click="saveremindmodal(item,$event)" v-if="htmlmoduleobj.drugremind">用药提醒</div>
                        <div class="infoedit" @click="getpatientnotemtd(item)" v-if="htmlmoduleobj.patientnote&&item.ishow5">健康记录查询</div>
                        <div class="comment dingwei">
                          <span @click="toggleshow2">设置健康顾问</span>
                          <ul class="jkgw_set none">
                            <li v-for="item2 in HealthDoctor.list" data-docid="{{item2.doctorId}}" class="dingwei" @click='changehealdocdivshow'>{{item2.doctorName}}
                              <div class="confirmdiv2">
                                <p>
                                  <button class='btn btn-success savedata' @click="changehealdoc(item,$event)">保存</button>
                                  <button type='button' class='btn btn-danger cancledata' @click="cancelchangehealdoc">取消</button>
                                </p>
                              </div>
                            </li>
                          </ul>
                        </div>
                        <div class="infoedit" @click = "getMonitor(item)" v-if="htmlmoduleobj.monitor && item.ishow5">阳性指标监测</div>
                        <div class="infoedit" @click = "getHealthRecord(item)" v-if="htmlmoduleobj.healthRecord && item.ishow5">健康记录添加</div>
                        <div class="comment dingwei" v-if="htmlmoduleobj.serviceset && item.ishow">
                          <span @click="toggleshow(item,$event)">服务设置</span>
                        </div>
                        <div class="jiuzhen dingwei" v-if="htmlmoduleobj.patientvisitplan && item.ishow3" @click="patientvisitplan(item)">
                          就诊安排
                        </div>
                        <button class="more circleBtn" @click="showalldiv($event)" v-show="item.ishow4==true" style="width:80px">更多</button>
                      </td>
                    </tr>
                    <tr>
                      <td colspan="3">
                        <div class="pull-left">
                          <button class="secondBtn" @click="refresh">刷新</button>
                        </div>
                        <div class="pull-right">
                          <boot-page v-ref:page :async="true" :lens="lenArr" :page-len="pageLen" :headersparam="headersparam" :param="param" v-if="showbootpage"></boot-page>
                        </div>
                      </td>
                    </tr>
                  </table>
                </div>
              </common-box2>
            </div>
        </div>
        <!-- 新增慢病病种 -->
        <div class="modal fade bs-example-modal-lg" id="add_mdisease" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog modal-lg">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                        <h4 class="modal-title" id="myModalLabel">
                新增病种</h4>
                    </div>
                    <div class="modal-body">
                        <form class="form-horizontal twostepform" role="form" id="addmdisease" @submit.prevent="addmdisease" name="addmdisease">
                            <div class="twostep">
                                <div class="twostep_1">
                                    <h4>健康信息</h4>
                                    <div class="form-group" v-for="item in steptwoformdata.chroniclevel">
                                        <label for="" class="col-md-3 control-label">慢病种类: </label>
                                        <div class="col-md-6">
                                            <select class="form-control" value="{{item.chronic}}" disabled="">
                                                <option selected>{{item.chronicText}}</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="" class="col-md-3 control-label">慢病种类: </label>
                                        <div class="col-md-6">
                                            <select class="form-control" name="addmchronic" v-model="addmchronicid" required>
                                                <option selected="" value="">请选择慢病种类</option>
                                                <option v-for="item in chronicList" value="{{item.chronic}}" @click="addnewmchronic(item)">{{item.chronicText}}</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="twostep_2" v-show="steptwoformdata.patientpersonalindexList.length!=0">
                                    <h4>监测目标</h4>
                                    <div class="form-group" v-for="item in steptwoformdata.patientpersonalindexList">
                                        <label for="" class="col-md-2 control-label">{{item.indexName}}:<span class="start">*</span></label>
                                        <div class="col-md-3">
                                            <input type="text" class="form-control" placeholder="上限" name="quantifyIndexNormalTop{{item.indexId}}" required value="{{item.quantifyIndexDangerTop}}" v-model="item.quantifyIndexNormalTop" maxlength="11" @blur="amount" disabled>
                                        </div>
                                        <div class="col-md-1">
                                            {{item.indexUnit}}
                                        </div>
                                        <div class="col-md-3">
                                            <input type="text" class="form-control" placeholder="下限" name="quantifyIndexNormalBottom{{item.indexId}}" required value="{{item.quantifyIndexDangerBottom}}" v-model="item.quantifyIndexNormalBottom" maxlength="11" @blur="amount" disabled>
                                        </div>
                                        <div class="col-md-1">
                                            {{item.indexUnit}}
                                        </div>
                                        <div class="col-md-2 start" v-if="parseFloat(item.quantifyIndexNormalBottom)>parseFloat(item.quantifyIndexNormalTop)">下限必须小于等于上限</div>
                                    </div>
                                    <div class="form-group" v-for="item in addmpatientpersonalindexList">
                                        <label for="" class="col-md-2 control-label">{{item.indexName}}:<span class="start">*</span></label>
                                        <div class="col-md-3">
                                            <input type="text" class="form-control" placeholder="上限" name="quantifyIndexNormalTop{{item.indexId}}" required value="{{item.quantifyIndexDangerTop}}" v-model="item.quantifyIndexNormalTop" maxlength="11" @blur="amount" disabled>
                                        </div>
                                        <div class="col-md-1">
                                            {{item.indexUnit}}
                                        </div>
                                        <div class="col-md-3">
                                            <input type="text" class="form-control" placeholder="下限" name="quantifyIndexNormalBottom{{item.indexId}}" required value="{{item.quantifyIndexDangerBottom}}" v-model="item.quantifyIndexNormalBottom" maxlength="11" @blur="amount" disabled>
                                        </div>
                                        <div class="col-md-1">
                                            {{item.indexUnit}}
                                        </div>
                                        <div class="col-md-2 start" v-if="parseFloat(item.quantifyIndexNormalBottom)>parseFloat(item.quantifyIndexNormalTop)">下限必须小于等于上限</div>
                                    </div>
                                </div>
                                <div class="twostep_3">
                                    <h4>生活习惯</h4>
                                    <div class="form-group" v-for="item in steptwoformdata.questionnaireresultdetailList" v-show="item.ishow">
                                        <div class="subjectContent" :class="{'bgblue':item.subjectAnswerType=='05'}" v-if="item.subjectAnswerType!='99'">{{item.xuhao+item.subjectContent}}</div>
                                        <div class="radio" v-for="itemsub in item.options" v-if="item.subjectAnswerType=='01'">
                                            <label @click="rdioisSelected(itemsub,item.options)">
                                                <input type="radio" name="{{'radio'+$parent.$index}}" value="{{itemsub.optionId}}" :checked="itemsub.selected"><span>{{itemsub.optionContent}}</span>
                                            </label>
                                        </div>
                                        <div class="checkbox" v-for="itemsub in item.options" v-if="item.subjectAnswerType=='02'">
                                            <label @click="checkboxisSelected(itemsub,item.options)">
                                                <input type="checkbox" value="" name="{{'checkbox'+$parent.$index}}" :checked="itemsub.selected"><span>{{itemsub.optionContent}}</span>
                                            </label>
                                        </div>
                                        <input v-if="item.subjectAnswerType=='03'" type="text" class="text" v-model="item.options[0].optionInputContent">
                                        <textarea v-if="item.subjectAnswerType=='04'" v-model="item.options[0].optionInputContent"></textarea>
                                    </div>
                                    <div class="form-group pagebreaks">
                                        <div class="col-md-12 ">
                                            <ul>
                                                <li v-for="item in pagetotlearr" @click="pageclick(item,$event)" :class="{activecur:$index==0}">{{$index+1}}</li>
                                            </ul>
                                            <span>总共{{pagetotlearr.length}}页</span>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <button type="submit" class="circleBtn center">保存</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <!-- 更换主管医生 -->
        <div class="modal fade" id="changedoc" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                        <h4 class="modal-title" id="myModalLabel">
                更换主管医生申请</h4>
                    </div>
                    <div class="modal-body">
                        <form class="form-horizontal" role="form" id="changedocform" v-on:submit.prevent="changedocsub">
                            <div class="form-group" style="border-bottom:1px dashed #ccc;padding-bottom:10px; width:96%;margin:0 auto 20px">
                                <div class="col-md-5 text-left">申请人：{{changedocajaxopt.subdata.applyUserName}}</div>
                                <div class="col-md-5 text-right">申请时间：{{currentTime}}</div>
                            </div>
                            <div class="form-group">
                                <label for="" class="col-md-3 control-label">患者姓名</label>
                                <div class="col-md-8">
                                    <input type="text" class="form-control" name="personName" value="{{changedocajaxopt.subdata.personName}}" disabled>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="" class="col-md-3 control-label">疾病病种</label>
                                <div class="col-md-8">
                                    <select class="form-control" id="jbbz">
                                        <option v-for="item in changedocajaxopt.commonChronicList" value="{{item.chronic}}">{{item.chronicText}}</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="" class="col-md-3 control-label">证件类型:</label>
                                <div class="col-md-8">
                                    <select class="form-control" disabled value={{changedocajaxopt.show.certificateType}}>
                                        <option>{{changedocajaxopt.show.certificateTypeText}}</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="" class="col-md-3 control-label">证件号码 :</label>
                                <div class="col-md-8">
                                    <input type="text" class="form-control" name="" value="{{changedocajaxopt.show.certificateNo}}" disabled>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="" class="col-md-3 control-label">原主管医生 :</label>
                                <div class="col-md-8">
                                    <select class="form-control" id="oldMangerobj" disabled="" autocomplete="off">
                                        <option v-for="item in changedocajaxopt.commonChronicList" value="{{item.doctorId+'/'+item.doctorName+'|'+item.level}}">{{item.doctorName}}</option>
                                    </select>
                                </div>
                            </div>
                            <!-- <div class="form-group">
                    <label for="" class="col-md-3 control-label">新主管医生 :</label>
                       <div class="col-md-8">
                                    <select class="form-control" v-model="changedocajaxopt.subdata.newManger" required>
                                        <option  value="{{item.doctorId}}" v-for="item in maindoctorlist">{{item.doctorName}}</option>

                                    </select>
                                </div>
                  </div> -->
                            <div class="form-group">
                                <label for="" class="col-md-3 control-label">更换原因 :</label>
                                <div class="col-md-8">
                                    <textarea class="form-control" rows="3" placeholder="请填写更换原因" v-model="changedocajaxopt.subdata.changeReason" required></textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="" class="col-md-3 control-label"></label>
                                <div class="col-md-7">
                                    <button type="submit" class="default ok center">保存</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <!-- 复查与复诊 -->
        <div class="modal fade bs-example-modal-lg" id="reviewvisit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog modal-lg">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                        <h4 class="modal-title" id="myModalLabel">
                预约复查与复诊</h4>
                    </div>
                    <div class="modal-body">
                        <form class="form-horizontal" role="form" id="reviewvisitform" v-on:submit.prevent="reviewvisitsave">
                            <div class="twostep">
                                <div class="twostep_1">
                                    <h4>复诊</h4>
                                    <div class="form-group" id="fuchaMark" v-for="item in reviewvisitlist.visitReview1">
                                        <label for="" class="col-md-2 control-label">复诊时间: </label>
                                        <div class="col-md-3">
                                            <input class="form-control" :value="item.reviewTime" name="review" id="review" :disabled="item.dataRecordId?true:false" @click="uselaydate($event,item)">
                                            <!-- <input class="form-control" value="" name="review" v-if="reviewvisitlist.visitReview1.length==0" id="review" @click="uselaydate($event)"> -->
                                        </div>
                                        <div class="col-md-2" v-show="item.reviewTime!=''">
                                            <button class="default ok" @click="cancledataconfirm(item,$event,$index)" type="button">取消复诊</button>
                                            <div class="confirmdiv">
                                                <div class='bg_master1'></div>
                                                <div class='toast3'>
                                                    <p>确认取消?</p>
                                                    <p>
                                                        <button class='btn btn-success savedata' type="button" @click="oksave(item,$event)">保存</button>
                                                        <button type='button' class='btn btn-danger cancledata' @click="cancelsave($event)">取消</button>
                                                    </p>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="twostep_2">
                                    <h4>复查</h4>
                                    <div class="form-group" v-for="item in reviewvisitlist.visitReview2">
                                        <label for="" class="col-md-2 control-label">复查项目: </label>
                                        <div class="col-md-3">
                                            <select class="form-control" name="fuchaproject" :disabled="item.dataRecordId?true:false" v-model="item.indicatorId">
                                                <option value="">请选择</option>
                                                <option v-for="sub in ReviewindicatorList" value="{{sub.indicatorId}}">{{sub.indicatorName}}</option>
                                            </select>
                                        </div>
                                        <label for="" class="col-md-2 control-label">复查时间: </label>
                                        <div class="col-md-3">
                                            <input class="form-control" v-model="item.reviewTime" :disabled="item.dataRecordId?true:false" @click="uselaydate($event,item)" id="{{'fuchatime'+$index}}">
                                        </div>
                                        <div class="col-md-2">
                                            <button class="canceldefault" @click="cancledataconfirm(item,$event,$index)" type="button">取消复查</button>
                                            <div class="confirmdiv">
                                                <div class='bg_master1'></div>
                                                <div class='toast3'>
                                                    <p>确认取消?</p>
                                                    <p>
                                                        <button class='btn btn-success savedata' @click="oksave(item,$event)" type="button">保存</button>
                                                        <button type='button' class='btn btn-danger cancledata' @click="cancelsave($event)">取消</button>
                                                    </p>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-md-6 col-md-offset-5 ztlan" @click="addcheck">+添加项目</div>
                                    </div>
                                </div>
                                <div class="form-group h60">
                                    <div class="col-md-6">
                                        <button class="circleBtn fr" type="submit">保存</button>
                                    </div>
                                    <div class="col-md-6">
                                        <button type="button" class="circleBtn2 fl" data-dismiss="modal">取消</button>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <!-- 修改会员信息弹出框组件 -->
        <member-edit v-ref:memberedit></member-edit>
        <!-- 自测指标 -->
        <div class="modal fade bs-example-modal-lg" id="selftestval" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog modal-lg">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                        <h4 class="modal-title" id="myModalLabel">
                自测指标</h4>
                    </div>
                    <div class="modal-body">
                        <self-test v-ref:selftestval></self-test>
                    </div>
                </div>
            </div>
        </div>
        <!-- 阳性指标监测 -->
         <div class="modal fade bs-example-modal-lg" id="monitor" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog modal-lg">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                        <h4 class="modal-title" id="myModalLabel">
                阳性指标监测</h4>
                    </div>
                    <div class="modal-body">
                        <monitor v-ref:monitor></monitor>
                    </div>
                </div>
            </div>
        </div>
        <div class="modal fade bs-example-modal-lg" id="healthRecord" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog modal-lg">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                        <h4 class="modal-title" id="myModalLabel">
                健康记录添加</h4>
                    </div>
                    <div class="modal-body">
                        <health-record v-ref:aaa></health-record>
                    </div>
                </div>
            </div>
        </div>
        <!-- vip入会和续费 -->
        <div class="modal fade" id="jionvip" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                        <h4 class="modal-title" id="myModalLabel">
                {{jionviplook.title}}</h4>
                    </div>
                    <div class="modal-body">
                        <div class="form-group meminfo">
                            <p>会员姓名：<span>{{jionviplook.personName}}</span></p>
                            <p>会员性别：<span>{{jionviplook.sexText}}</span></p>
                            <p class="long">证件类型：<span>{{jionviplook.certificateTypeText}}</span></p>
                        </div>
                        <div class="form-group meminfo">
                            <p>证件号码：<span>{{jionviplook.certificateNo}}</span>
                                <p>会员年龄：<span>{{jionviplook.dob}}</span></p>
                                <p>会员手机：<span>{{jionviplook.phoneNo}}</span></p>
                        </div>
                        <div class="changeinfo cbafter">
                            <form class="form-horizontal" role="form" v-on:submit.prevent="vipmembershipsave">
                                <div class="cb changeinfo_con">
                                    <div class="col-md-6 memtype">
                                        <div class="form-group" v-if="jionvipform">
                                            <label class="col-md-5 control-label text-right">请选择会员类型</label>
                                            <div class="col-md-7">
                                                <select class="form-control" :required="jionvipform" v-model="jionvipsub.memberType">
                                                    <option :value="item.memberType" v-for="item in memberTypelist">{{item.memberName}}</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="form-group" v-if="!jionvipform">
                                            <label class="col-md-5 control-label text-right lh26">你的会员类型：</label>
                                            <div class="col-md-7">
                                                <p>{{memberName}}</p>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-6" id="payprice">
                                        <div class="col-md-12">
                                            <div class="btn-group">
                                                <button type="button" class="default">{{memberTypeprice.duesName}}</button>
                                                <button type="button" class="default">{{memberTypeprice.dues}}元</button>
                                            </div>
                                        </div>
                                        <div class="col-md-12">
                                            <div class="btn-group">
                                                <button type="button" class="default">{{memberTypeprice.prepaymentName}}</button>
                                                <button type="button" class="default">{{memberTypeprice.prepayment}}元</button>
                                            </div>
                                        </div>
                                        <div class="col-md-12">
                                            <div class="btn-group">
                                                <button type="button" class="default orange">合计</button>
                                                <button type="button" class="default colororange">{{totalFee}}元</button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-12 contype">
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label class="col-md-5 control-label text-right">付款方式</label>
                                            <div class="col-md-7">
                                                <select class="form-control" v-model="jionvipsub.payType" required>
                                                    <option v-for="item in paytypelist" :value="item.key">{{item.text}}</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group" id="vipmemdatecon">
                                            <label class="col-md-5 control-label text-right">入会日期</label>
                                            <div class="col-md-7">
                                                <input class="form-control" id="vipmemdate" :required="jionvipform" v-model="jionvipsub.memberJoinDate">
                                            </div>
                                        </div>
                                        <div class="form-group" v-if="!jionvipform">
                                            <label class="col-md-5 control-label text-right">到期日期</label>
                                            <div class="col-md-7">
                                                <p>{{dueDate}}</p>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-6" v-if="jionvipform">
                                        <div class="form-group">
                                            <label class="col-md-5 control-label text-right">健康顾问</label>
                                            <div class="col-md-7">
                                                <select class="form-control" v-model="jionvipsub.doctorId" :required="jionvipform">
                                                    <option v-for="item in  search.healthDoctor" :value="item.doctorId">{{item.doctorName}}</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div>
                                    <button class="longBtn center">保存</button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- 设置服务模态框 -->
        <ul class="fw_set" id="fw_set" :style="styleObject">
            <h3 v-show="servicesettext!=''">{{servicesettext}}</h3>
            <li class="cbafter" v-for="(index, subitem) in servicesetlist">
                <p class="checkboxThree">
                    <input type="checkbox" :id="index" class="chk_3" v-model="subitem.effectiveFlag" :true-value="1" :false-value="0" :name="index" />
                    <label :for="index"></label>
                </p>
                <span>{{subitem.serviceName}}</span>
                <p class="checkboxFive">
                    <input type="checkbox" :id="'f'+index" name="" v-model="subitem.freeFlag" :true-value="1" :false-value="0" :name="'f'+index" :disabled="subitem.effectiveFlag=='0'?true:false" />
                    <label :for="'f'+index"></label>
                </p>
                <span>免费咨询</span>
            </li>
            <li class="cbafter btngroup">
                <button type="button" class="default fl dele" id="handclose2" @click="handclose2">取消</button>
                <button type="button" class="default fr blue" @click="servicesetsave">保存</button>
            </li>
            <!--  <li class="cbafter">
                                            <p class="checkboxThree">
                                                <input type="checkbox" :id="'t'+$index" class="chk_3" />
                                                <label :for="'t'+$index"></label>
                                            </p>
                                            <span>电话咨询</span>
                                            <p class="checkboxFive">
                                                <input type="checkbox" :id="'h'+$index" />
                                                <label :for="'h'+$index"></label>
                                            </p>
                                            <span>免费咨询</span>
                                        </li> -->
        </ul>
        <!-- 查看会员状况记录列表 -->
        <patient-note v-ref:patientnotepage :patientnoteparam="patientnoteparam" :patientnotename="patientnotename"></patient-note>
        <!-- 回访安排 -->
        <div class="modal fade" id="revisitschedule" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                        <h4 class="modal-title" id="myModalLabel">回访安排</h4>
                    </div>
                    <div class="modal-body">
                        <form class="form-horizontal" role="form" v-on:submit.prevent="revisitschedulesave">
                            <div class="memberinfo">
                                <p>患者姓名：<span>{{revisitscheduledata.personName}}</span></p>
                                <p>年龄：<span>{{revisitscheduledata.personAge}}岁</span></p>
                                <p>性别：<span>{{revisitscheduledata.personSexText}}</span></p>
                                <div>病种：<span>{{revisitscheduledata.chronicText}}</span></div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-3 control-label">下次访问日期：</label>
                                <div class="col-md-8">
                                    <input type="text" class="form-control" v-model="revisitscheduledata.revisitDate" id="revisitDate">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-3 control-label">回访方式：</label>
                                <div class="col-md-8">
                                    <select class="form-control" v-model="revisitscheduledata.revisitType" required>
                                        <option v-for="item in  dictionary.revisitType" :value="item.key">{{item.text}}</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-3 control-label">回访电话：</label>
                                <div class="col-md-8">
                                    <input type="text" class="form-control" name="" v-model="revisitscheduledata.phoneNo" disabled>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-3 control-label">回访最佳时段：</label>
                                <div class="col-md-3">
                                    <input type="text" class="form-control" name="" v-model="revisitscheduledata.revisitBeginTime" required>
                                </div>
                                <div class="col-md-1">
                                    <p>-</p>
                                </div>
                                <div class="col-md-3">
                                    <input type="text" class="form-control" name="" v-model="revisitscheduledata.revisitEndTime" required>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-3 control-label"></label>
                                <div class="col-md-7">
                                    <button type="submit" class="default ok center">保存</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <!-- 回访记录 -->
        <revisit-record v-ref:revisitrecordmodel></revisit-record>
        <!-- 就诊安排 -->
        <div class="modal fade bs-example-modal-lg" id="patientvisitplan" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog modal-lg">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" @click="resetmodal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                        <h4 class="modal-title" id="myModalLabel">
                就诊安排-{{currentView}}</h4>
                    </div>
                    <div class="modal-body">
                        <org-list v-ref:orglist v-show="currentView=='请选择医院'"></org-list>
                        <dept-list v-ref:deptlist v-show="currentView=='请选择科室'"></dept-list>
                        <docor-list v-ref:docorlist v-show="currentView=='请选择医生'"></docor-list>
                        <health-docor-plan v-ref:healthdocorplan v-show="currentView=='请选择预约日期'" :mpiidtohdp="mpiidtohdp" :patientname="patientname"></health-docor-plan>
                    </div>
                </div>
            </div>
        </div>
        <!-- 用药提醒列表 -->
        <div class="modal fade bs-example-modal-lg" id="medicationreminderlist" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog modal-lg">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                        <h4 class="modal-title" id="myModalLabel">
                用药提醒</h4>
                    </div>
                    <div class="modal-body">
                        <button class="default ok fr" @click='editremindmodal()'>新增用药提醒</button>
                        <table class="table table-hover DrugRemindInfoList">
                            <thead>
                                <tr>
                                    <th>药品名称</th>
                                    <th>每次用量</th>
                                    <th>每日频次</th>
                                    <th>用药时间</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr v-for="item in DrugRemindList">
                                    <td>{{item.drugName}}</td>
                                    <td>{{item.quantityEveryTime}}</td>
                                    <td >{{item.everyDayFrequency}}</td>
                                    <td class="everyDayFrequency"><span v-for="sitem in item.drugremindTimesList">{{sitem.remindTime}}</span></td>
                                    <td><span class="glyphicon glyphicon-pencil" @click="editremindmodal(item)"></span><span class="glyphicon glyphicon-trash" @click="deleremindmodal(item)"></span></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <!-- 用药提醒新增或者修改 -->
        <div class="modal fade bs-example-modal-lg" id="medicationreminder" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog modal-lg">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" @click="closeeditremindmodal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                        <h4 class="modal-title" id="myModalLabel">
                用药提醒</h4>
                    </div>
                    <div class="modal-body">
                        <form class="form-horizontal" role="form" id="changedocform" v-on:submit.prevent="saveremind">
                            <div class="form-group">
                                <label for="" class="col-md-3 control-label">药品名称：<span class="start">*</span></label>
                                <div class="col-md-8">
                                    <input type="text" class="form-control" name="drugName" v-model="remindsavedata.drugName" required :disabled="iseditoradd">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-3 control-label">每日频次：</label>
                                <div class="col-md-8">
                                    <div class="radio">
                                        <label class="checkbox-inline">
                                            <input type="radio" name="everyDayFrequency" v-model="remindsavedata.everyDayFrequency" value="1">1次
                                        </label>
                                        <label class="checkbox-inline">
                                            <input type="radio" name="everyDayFrequency" v-model="remindsavedata.everyDayFrequency" value="2">2次
                                        </label>
                                        <label class="checkbox-inline">
                                            <input type="radio" name="everyDayFrequency" v-model="remindsavedata.everyDayFrequency" value="3">3次
                                        </label>
                                         <label class="checkbox-inline">
                                            <input type="radio" name="everyDayFrequency" v-model="remindsavedata.everyDayFrequency" value="4">4次
                                        </label>
                                        <label class="checkbox-inline">
                                            <input type="radio" name="everyDayFrequency" v-model="remindsavedata.everyDayFrequency" value="5">5次
                                        </label>
                                        <label class="checkbox-inline">
                                            <input type="radio" name="everyDayFrequency" v-model="remindsavedata.everyDayFrequency" value="6">6次
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="" class="col-md-3 control-label">用药时间：</label>
                                <div class="col-md-8 cbafter">
                                    <div  v-for="(sindex,sitem) in remindsavedata.drugremindTimesList" track-by="$index" class="maxsix">
                                    <input class="form-control" type="text" v-model="sitem.remindTime" @focus="slectedtime(sitem,sindex)">
                                </div>

                                </div>

                            </div>
                            <div class="form-group">
                                <label for="" class="col-md-3 control-label">每次用量：<span class="start">*</span></label>
                                <div class="col-md-8">
                                    <input type="text" class="form-control" name="quantityEveryTime" v-model="remindsavedata.quantityEveryTime" required>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-3 control-label">是否提醒：</label>
                                <div class="col-md-8">
                                    <div class="radio">
                                        <label class="checkbox-inline">
                                            <input type="radio" name="remindFlag" v-model="remindsavedata.remindFlag" value="1">是
                                        </label>
                                        <label class="checkbox-inline">
                                            <input type="radio" name="remindFlag" v-model="remindsavedata.remindFlag" value="0">否
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="" class="col-md-3 control-label">提醒时间：</label>
                                <div class="col-md-8">
                                    <select class="form-control" v-model="remindsavedata.remindAdvance">
                                        <option value="5">用药前5分钟</option>
                                        <option value="15">用药前15分钟</option>
                                        <option value="30">用药前30分钟</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="" class="col-md-3 control-label">提醒方式：</label>
                                <div class="col-md-8">
                                    <select class="form-control" v-model="remindsavedata.remindStyle">
                                        <option v-for="item in dictionary.remindStyle" :value="item.key">{{item.text}}</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="" class="col-md-3 control-label"></label>
                                <div class="col-md-7">
                                    <button type="submit" class="default ok center">保存</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <!-- 用药提醒选择时分 -->
        <div class="modal fade" id="selectedHM" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-body cbafter">
                        <div class="form-group">
                            <label for="" class="col-md-2 control-label">小时：</label>
                            <div class="col-md-4">
                                <select class="form-control" v-model="selectedH">
                                    <option :value="parseInt(n)>9?n+'':'0'+n" v-for="n in 24">{{n>9?n:'0'+n}}</option>
                                </select>
                            </div>
                            <label for="" class="col-md-2 control-label">分钟：</label>
                            <div class="col-md-4">
                                <select class="form-control" v-model="selectedM">
                                    <option :value="parseInt(n)>9?n+'':'0'+n" v-for="n in 60">{{n>9?n:'0'+n}}</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <div class="centerbutton">
                            <button @click="getHM" class="default ok center">确认</button>
                        </div>
                    </div>
                </div>
                <!-- /.modal-content -->
            </div>
            <!-- /.modal -->
        </div>
        <!-- 用药提醒删除 -->
        <div class="modal fade" id="deleremindmodal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-body cbafter">
                        <p class="text-center">确认删除</p>
                    </div>
                    <div class="modal-footer">
                        <div class="centerbutton">
                            <button @click="confirmdeleremind" class="default ok center">确认</button>
                            <button @click="canceldeleremind" class="default greynobg center">取消</button>
                        </div>
                    </div>
                </div>
                <!-- /.modal-content -->
            </div>
            <!-- /.modal -->
        </div>
    </div>
</template>
<script>
var headimg = require("assets/img/cs2.jpg");
import 'assets/lib/bootstrap-3.3.2/css/bootstrap.min.css'
import 'assets/lib/bootstrap-3.3.2/js/bootstrap.min.js'
import 'assets/lib/laydate/laydate.js'
import 'assets/lib/laydate/need/laydate.css'
import 'assets/lib/laydate/skins/danlan/laydate.css'
import 'assets/reset.css'
import Public from 'assets/public.js'
import moduleHead from 'components/module-head'
import menuList from 'components/menu-list'
import bootPage from 'components/BootPage.vue'
import memberEdit from 'components/member-edit'
import selfTest from 'components/self-test'
import patientNote from 'components/patientNote'
import revisitRecord from 'components/revisit-record'
import orgList from 'components/org-list'
import deptList from 'components/dept-list'
import docorList from 'components/docor-list'
import healthDocorPlan from 'components/health-docor-plan'
import monitor from 'components/monitor'
import medicalAppointment from 'components/medical-appointment'
import medicalAppointmentDemand from 'components/medical-appointment-demand'
import medicalReportDemand from 'components/medical-report-demand'
import healthRecord from 'components/health-record'
import commonBox2 from 'components/commonBox2'
import {
    actions
}
from '../../vuex/store';
export default {
    vuex: { //病人就诊安排用到
        actions: actions,
        getters: {
            currentView: (data) => data.currentView,
        }
    },
    data() {
        return {
            // self-test组件引起的'total' of undefined
            localDoctorId: '',
            showbootpage: false, //隐藏分页组件先判断列表的功能按钮再进行分页显示
            login_roleId: Public.getsessionStorage("roleId"),
            currentTime: Public.formatDate(),
            headimg: headimg,
            lenArr: [10, 20, 50], // 每页显示长度设置
            pageLen: 5, // 可显示的分页数
            headersparam: {
                "X-Service-Id": "coms.memberService",
                "X-Service-Method": "findPersonUserInfo",
            },
            param: {
                firstRequest: 1, //进入列表页面的请求的标识，区别搜索的的请求
            }, // 传递参数,
            tableList: [], // 分页组件传回的分页后数据
            dictionary: { //字典可添加
                gender: [],
                nationality: [],
                certificateType: [],
                returnVisitCycle: [],
                revisitType: [],
                remindStyle: [],
            },



            chronicList: [], //慢病种类 增加慢病方案的时候


            // chronicid:"",//慢病ID 通过选取这个显示对应的监测目标
            search: { //搜索所需获取的字段
                issearchlist: false,
                searchtableList: [], //搜索之后返回的列表数据
                memberTypes: [],
                healthDoctor: [],
                mainDoctor: [],
                commonChronics: [],
                searchformdata: {
                    "name": "", //姓名
                    "idcard": "", //身份证
                    "mobile": "", //手机号
                    "sex": "", //性别
                    "memberType": "", //会员类型
                    "chronic": "", //疾病种类
                    "mainDoctor": "", //主管医生id
                    "healthDoctor": "", //健康顾问id
                    "pageNo": "1",
                    "pageSize": "10",
                    "mainDoctorname": ""

                } //搜索所需获取的字段
            },

            steptwoformdata: {
                mpiId: "",
                chroniclevel: [],
                patientpersonalindexList: [],
                questionnaireresult: {
                    questionnaireId: "",
                    operaterType: "031", //固定值
                    resultId: "",

                },
                questionnaireresultdetailList: []
            },


            // 更换主管医生开始
            changedocitem: {},
            changedocajaxopt: {
                "subdata": {
                    "mpiId": "",
                    "personName": "",
                    "applyUser": "", //当前医生doctorId
                    "applyUserName": "", //当前医生姓名
                    "chronic": "", //慢病id
                    "mangerType": "061", //管理人员类型： 061主管医生 071健康顾问
                    "oldManger": "", //原医生的doctorId
                    "oldMangerLevel": "", //原医生的职称(level)
                    "oldMangerName": "", //原医生的姓名
                    "newManger": "", //更换医生的doctorId
                    "newMangerLevel": "", //更换医生的职称(level)
                    "newMangerName": "", //更换医生的姓名
                    "changeReason": "",
                    "applyType": "031" //固定填031
                },

                show: {
                    "chronicText": "",
                    "certificateType": "",
                    "certificateNo": "",
                    "certificateTypeText": "",
                },
                commonChronicList: []

            },


            // 更换主管医生结束

            // 新增慢病开始 和修改会员共用数据steptwoformdata
            addmchronicid: "", //慢病ID 通过选取这个显示对应的监测目标
            addmchronicobj: {}, //慢病新增慢病的数据添加到steptwoformdata.chroniclevel
            addmpatientpersonalindexList: [],
            // addmquestion: [], //生活问卷
            // addmformdata: {
            //     mpiId: "",
            //     "chroniclevel": [],
            //     "patientpersonalindexList": [],
            //     "questionnaireresult": {
            //         "questionnaireId": "",
            //         "operaterType": "2" //固定值
            //     },
            //     "questionnaireresultdetailList": []
            // },

            // 新增慢病end
            // 设置健康顾问start
            HealthDoctor: {
                list: [],
            },
            // 设置健康顾问end
            // 模块数组
            moduleArr: [],
            htmlmoduleobj: {
                infoedit: false,
                changedoc: false,
                addmb: false,
                fucha: false,
                comment: false,
                serviceset: false,
                sethealthdoc: false,
                selftest: false,
                vipmembership: false,
                viprenew: false,
                patientnote: false,
                revisitschedule: false,
                revisitrecord: false,
                patientvisitplan: false,
                monitor:false,
                healthRecord:false
            },

            currentDocId: "", //当前登录医生的id
            // 复诊和复查开始
            reviewvisitlist: {
                "mpiId": "",
                visitReview1: [],
                visitReview2: []
            },

            ReviewindicatorList: [],
            // 复诊和复查结束
            pagetotlearr: [], //问卷分页符
            //vip会员入会和续费 开始
            jionviplook: {
                title: "",
                certificateNo: "",
                certificateTypeText: "",
                dob: "",
                personName: "",
                phoneNo: "",
                sexText: "",

            },
            jionvipsub: {
                "mpiId": "",
                "memberType": "",
                "totalFee": "",
                "doctorId": "",
                "payType": "", //支付类型 字典:base_payMethod
                memberJoinDate: "",

            },
            jionvipform: false,
            memberTypelist: [], //会员类型选择数据
            memberTypelist2: [],
            paytypelist: [], //付款方式列表
            memberTypeprice: {
                dues: 0,
                memberName: "",
                memberPriceType: "",
                memberType: "",
                prepayment: 0,
                priceType: "",
            },
            dueDate: "", //到期日期
            memberName: "", //续费的时候用到
            //vip会员入会和续费结束

            //服务设置开始
            servicesetlist: [], //当前登录医生的有资质的服务列表
            servicesetsub: { //获取当前会员开通的服务数据
                "objectType": "031", //写死
                "objectId": "", //当前登录医生doctorid
                "servicedObjectType": "041", //写死 元/次对应的编号
                "servicedObjectId": "" //mpiId
            },

            styleObject: {
                left: '0px',
                top: '0px'
            },
            servicesettext: "",
            //服务设置开始结束
            //查看会员状况记录开始
            // patientnoteparam:{
            //      mpiId: "",
            //  },
            //  patientnotename:""
            //查看会员状况记录结束

            //回访安排开始
            revisitscheduledata: {
                chronicText: "",
                "mpiId": "",
                "revisitType": "",
                "remark": "",
                "cycleTypeText": "月",
                "planId": "",
                "revisitDate": "",
                "personName": "",
                "personAge": "",
                "revisitTypeText": "",
                "revisitEndTime": "9:00",
                "revisitBeginTime": "17:00",
                "cycleType": "",
                "personSex": "",
                "phoneNo": "",
                personSexText: ""
            },
            //回访安排结束

            //就诊安排开始
            mpiidtohdp: "",
            patientname: "",
            //就诊安排结束
            //用药提醒开始
            remindsavedata: {
                "mpiId": "",
                "drugRemindId": "",
                "everyDayFrequency": "1", //每日频次
                "quantityEveryTime": "", //每次用量
                "remindFlag": "1",
                "remindAdvance": "5",
                "remindStyle": "01",
                "drugremindTimesList": [{
                    "remindTime": this.getcurHandM()
                }],
                "drugName": "",

            },
            iseditoradd:false,
            selectedH: "",
            selectedM: "",
            remindTimeindex: "",
            DrugRemindList: [],
            curRemindmpiId: "",
            curdeleremindid: "",
            //用药提醒结束

            //向子组件传mpiId
            mpiIds: ''
        }
    },
    computed: {
        'totalFee': function() {
            return this.memberTypeprice.dues + this.memberTypeprice.prepayment
        }
    },
    components: {
        moduleHead, bootPage, menuList, memberEdit, selfTest, patientNote, revisitRecord, orgList, deptList, docorList, healthDocorPlan,medicalAppointment,medicalAppointmentDemand,medicalReportDemand,monitor,healthRecord,commonBox2
    },

    ready() {
        var that = this;

        // 会员类型列表
        $.when(Public.commonajax("coms.memberTypeService", "findMemberServerAndPrice", "[[]]")).done(function(res) {
            that.memberTypelist = res.body.filter(function(el) {
                return el.memberType != 1;
            });
            that.memberTypelist2 = that.memberTypelist;

        });
        // 根据moduleId获取列表要显示的模块
        $.when(Public.commonajax("base.menuService", "findPcMoudleParamByMoudle", "['" + Public.getParameter('moduleId') + "']"))
            .done(function(data) {
                var moduleArr = data.body.paramValue.split(',');
                that.moduleArr = moduleArr;
                // 设置列表中的模块 比如服务设置
                for (var i = 0; i < that.moduleArr.length; i++) {
                    // var moduleArritem=moduleArr[i];
                    if (that.moduleArr[i] == 1) {
                        that.htmlmoduleobj.infoedit = true;
                    }

                    if (that.moduleArr[i] == 2) {
                        that.htmlmoduleobj.changedoc = true;
                    }
                    if (that.moduleArr[i] == 3) {
                        that.htmlmoduleobj.addmb = true;
                    }
                    if (that.moduleArr[i] == 4) {
                        that.htmlmoduleobj.fucha = true;
                    }
                    if (that.moduleArr[i] == 5) {
                        that.htmlmoduleobj.comment = true;
                    }
                    if (that.moduleArr[i] == 6) {
                        that.htmlmoduleobj.serviceset = true;
                    }
                    if (that.moduleArr[i] == 7) {
                        that.htmlmoduleobj.sethealthdoc = true;
                    }
                    if (that.moduleArr[i] == 8) {
                        that.htmlmoduleobj.selftest = true;
                    }
                    if (that.moduleArr[i] == 9) {
                        that.htmlmoduleobj.vipmembership = true;
                    }
                    if (that.moduleArr[i] == 10) {
                        that.htmlmoduleobj.viprenew = true;
                    }
                    if (that.moduleArr[i] == 11) {
                        that.htmlmoduleobj.patientnote = true;
                    }
                    if (that.moduleArr[i] == 12) {
                        that.htmlmoduleobj.revisitschedule = true; //回访安排
                    }
                    if (that.moduleArr[i] == 13) { //回访记录
                        that.htmlmoduleobj.revisitrecord = true;
                    }
                    if (that.moduleArr[i] == 14) { //就诊安排
                        that.htmlmoduleobj.patientvisitplan = true;
                    }
                    if (that.moduleArr[i] == 14) { //用药提醒
                        that.htmlmoduleobj.drugremind = true;
                    }
                    if (that.moduleArr[i] == 15) { //阳性监测
                        that.htmlmoduleobj.monitor = true;
                    }
                    if (that.moduleArr[i] == 16) { //健康记录添加
                        that.htmlmoduleobj.healthRecord = true;
                    }

                };
                // that.refresh()
                that.showbootpage = true;
            })
            //日历插件
            // 获取字典
        $.when(Public.commonajax("coms.multipleDictionaryService", "findDic", "[['base.dictionary.base_nationality','base.dictionary.base_gender','base.dictionary.base_certificateType','base.dictionary.base_payMethod','base.dictionary.base_returnVisitCycle','coms.dictionary.coms_revisitType','base.dictionary.base_remindStyle']]"))
            .done(function(data) {
                var data = data.body;
                for (var i = 0; i < data.length; i++) {
                    if (data[i].dicId.indexOf("gender") != -1) {
                        that.dictionary.gender = data[i].items
                    }
                    if (data[i].dicId.indexOf("nationality") != -1) {
                        that.dictionary.nationality = data[i].items
                    }
                    if (data[i].dicId.indexOf("certificateType") != -1) {
                        that.dictionary.certificateType = data[i].items
                    }
                    if (data[i].dicId.indexOf("payMethod") != -1) {
                        that.paytypelist = data[i].items.filter(function(el) {
                            return parseInt(el.key) > 20;
                        });
                    }
                    if (data[i].dicId.indexOf("returnVisitCycle") != -1) {
                        that.dictionary.returnVisitCycle = data[i].items
                    }
                    if (data[i].dicId.indexOf("revisitType") != -1) {
                        that.dictionary.revisitType = data[i].items
                    }
                    if (data[i].dicId.indexOf("remindStyle") != -1) {
                        that.dictionary.remindStyle = data[i].items
                    }

                }

            })
            // 获取慢病种类
        $.when(Public.commonajax("coms.commonChronicService", "findCommonChronic", "[[]]"))
            .done(function(data) {
                that.chronicList = data.body;
            })
            // 获取健康顾问列表
        $.when(Public.commonajax("coms.doctorService", "findHealthDoctor", "[[]]"))
            .done(function(data) {
                that.HealthDoctor.list = data.body;
            })

        // 获取搜索的 会员类型：   疾病种类：   主管医生：   健康顾问：4个数据
        $.when(Public.commonajax("coms.memberService", "findMemberSearchCon", "[[]]"))
            .done(function(data) {
                var data = data.body;
                that.search.memberTypes = data.memberTypes;
                that.search.healthDoctor = data.healthDoctor;
                // var temobj={"doctorId":"","doctorName":""};
                // data.mainDoctor.unshift(temobj);
                that.search.mainDoctor = data.mainDoctor;
                // console.log(that.search.mainDoctor);
                that.search.commonChronics = data.commonChronics;
            })
            // 获取当前登录医生的信息 更换主管医生中用到
        $.when(Public.commonajax("coms.doctorService", "getDoctorCurrent", "[]"))
            .done(function(res) {
                that.changedocajaxopt.show.mainDoctorname = res.body.name;
                that.changedocajaxopt.subdata.applyUser = res.body.doctorId;
                if (that.login_roleId == "main_doctor") {
                    that.search.searchformdata.mainDoctor = res.body.doctorId; //搜索框主管医生中赋值
                    that.search.searchformdata.mainDoctorname = res.body.name; //搜索框主管医生中赋值
                }
                if (that.login_roleId == "health_doctor") {
                    that.search.searchformdata.healthDoctor = res.body.doctorId; //搜索框主管医生中赋值
                }
                $.when(Public.commonajax("base.doctorProvider", "getLocalDoctorIdById", "['1','" + res.body.doctorId + "']"))
                  .done(function(res1) {
                    console.log(JSON.stringify(res1))
                    that.localDoctorId = res1.body;
                  })
                that.changedocajaxopt.subdata.applyUserName = res.body.name;
                that.changedocajaxopt.subdata.newManger = res.body.doctorId;
                that.changedocajaxopt.subdata.newMangerLevel = res.body.level;
                that.changedocajaxopt.subdata.newMangerName = res.body.name;
                that.currentDocId = res.body.doctorId;


            })
            // 获取查询复查项目列表
        $.when(Public.commonajax("coms.reviewService", "getReviewindicatorList", "[]"))
            .done(function(res) {
                that.ReviewindicatorList = res.body;

            })
            // 健康顾问VIP入会日期
        var mindate = this.getLastYearYestdy();
        laydate({
            elem: "#vipmemdate",
            min: mindate,
            max: laydate.now(), //设定最小日期为当前日期
            choose: function(datas) { //选择日期完毕的回调
                that.jionvipsub.memberJoinDate = datas;
            }
        });
        laydate({
            elem: "#revisitDate",
            min: laydate.now(), //设定最小日期为当前日期
            choose: function(datas) { //选择日期完毕的回调
                that.revisitscheduledata.revisitDate = datas;
            }
        });
        laydate({
            elem: "#nextrevisitDate",
            min: laydate.now(), //设定最小日期为当前日期
            choose: function(datas) { //选择日期完毕的回调
                that.revisitscheduledata.revisitDate = datas;
            }
        });


    },
    methods: {
      docHandler (idCard) {
        var self = this
        $.when(Public.commonajax("coms.bridAccountService", "getBridByIdCard", "['" + idCard + "']"))
          .done(function(res) {
            if (res.code == 200) {
              window.location.href = "Wechat://"+" "+self.localDoctorId+"|"+res.body
            } else {
              Public.ajaxPrompt(res.msg)
            }
          })
      },
            //获得上一年在昨天这一天的日期
            getLastYearYestdy() {
                var date = new Date();
                var strYear = date.getFullYear() - 1;
                var strDay = date.getDate();
                var strMonth = date.getMonth() + 1;
                if (strMonth < 10) {
                    strMonth = "0" + strMonth;
                }
                if (strDay < 10) {
                    strDay = "0" + strDay;
                }
                var datastr = strYear + "-" + strMonth + "-" + strDay;
                return datastr;
            },
            // 点击修改会员
            edit_member(item) {
                $("#edit_member").show();
                $(".bg_master2").show();
                this.$refs.memberedit.getmipiid(item.person.mpiId);
            },
            // 点击自测指标
            selftest(item) {
                $("#selftestval").modal("show");
                this.$refs.selftestval.searchselftestbytime(item.person.mpiId);
            },
            getMonitor(item){
               $("#monitor").modal("show");
                this.$refs.monitor.searchselftestbytime(item);
            },
            getHealthRecord(item){
                $("#healthRecord").modal("show");
                this.$refs.aaa.searchselftestbytime(item);
            },
            // 搜索中主管医生下拉框选中后赋值给input
            mayclick(item, event) {
                if (item == undefined && event == undefined) {
                    this.search.searchformdata.mainDoctor = "";
                    this.search.searchformdata.mainDoctorname = "";
                } else {
                    this.search.searchformdata.mainDoctor = item.doctorId;
                    this.search.searchformdata.mainDoctorname = item.doctorName

                }
                $(".yishenglist").hide();

            },
            // 显示列表中所有所有的div
            showalldiv(event) {
                $(event.target).siblings("div:gt(5)").toggle();
                // $(event.target).html("隐藏");
            },

            // 设置健康顾问
            changehealdocdivshow(event) {
                $(event.target).find('.confirmdiv2').show();

            },
            changehealdoc(item, event) {
                var that = this;
                var $li = $(event.target).closest('li');
                $li.addClass('active').siblings('li').removeClass('active')
                var newdocid = $li.attr("data-docid");
                $.when(Public.commonajax("coms.doctorService", "saveHealthDoctor", "['" + item.person.mpiId + "','" + newdocid + "']"))
                    .done(function(res) {
                        if (res.code == 200) {
                            $(event.target).closest('.jkgw_set').hide();
                            Public.ajaxPrompt('提交成功')
                            that.refresh()
                        }

                    })
            },
            cancelchangehealdoc(event) {
                $(event.target).closest('.confirmdiv2').hide();
            },
            // 点击搜索查询
            searchmethod() {
                var that = this;
                this.param = this.search.searchformdata;
                console.log(this.param);
                this.$nextTick(function() {
                    this.refresh();
                })

            },

            // 验证小数点只能保留两位
            amount(event) {
                var th = event.target;
                var regStrs = [
                    // ['^0(\\d+)$', '$1'], //禁止录入整数部分两位以上，但首位为0
                    // ['[^\\d\\.]+$', ''], //禁止录入任何非数字和点
                    ['\\.(\\d?)\\.+', '.$1'], //禁止录入两个以上的点
                    ['^(\\d+\\.\\d{2}).+', '$1'] //禁止录入小数点后两位以上
                ];
                for (var i = 0; i < regStrs.length; i++) {
                    var reg = new RegExp(regStrs[i][0]);
                    th.value = th.value.replace(reg, regStrs[i][1]);
                }
            },
            refresh() {
                this.$refs.page.refresh()
            },

            // 更换主管医生
            changedoc(item) {
                var that = this;
                console.log(item);
                $("#changedoc").modal("show");
                this.changedocitem = item;
                this.changedocajaxopt.subdata.mpiId = item.person.mpiId;
                this.changedocajaxopt.commonChronicList = item.commonChronicList;
                this.changedocajaxopt.subdata.personName = item.person.personName;
                that.changedocajaxopt.subdata.changeReason = "";
                //以下是显示到页面上用的数据
                this.changedocajaxopt.show.chronicText = item.commonChronicList[0].chronicText;
                this.changedocajaxopt.show.certificateType = item.person.certificate.certificateType;
                this.changedocajaxopt.show.certificateTypeText = item.person.certificate.certificateTypeText;
                this.changedocajaxopt.show.certificateNo = item.person.certificate.certificateNo;

            },
            // 更换主管医生提交表单
            changedocsub() {
                var that = this;
                var query = $("#oldMangerobj").val();
                var iStart1 = query.indexOf("/");
                var iStart2 = query.indexOf("|");
                this.changedocajaxopt.subdata.chronic = $("#jbbz").val();
                this.changedocajaxopt.subdata.oldManger = query.substring(0, iStart1);
                this.changedocajaxopt.subdata.oldMangerName = query.substring(iStart1 + 1, iStart2);
                this.changedocajaxopt.subdata.oldMangerLevel = query.substring(iStart2 + 1);
                if (this.changedocajaxopt.subdata.oldManger == this.changedocajaxopt.subdata.applyUser) {
                    Public.ajaxPrompt("当前主管医生已为你自己");
                } else {

                    // console.log(this.changedocajaxopt);
                    $.when(Public.commonajax("coms.doctorService", "applyModifyMainDoctor", "[" + JSON.stringify(this.changedocajaxopt.subdata) + "]"))
                        .done(function(res) {
                            if (res.code == 200) {
                                $("#changedoc").modal("hide");
                                Public.ajaxPrompt("提交成功");
                                that.changedocajaxopt.commonChronicList = [];
                                that.maindoctorlist = [];
                                that.changedocajaxopt.subdata.changeReason = "";
                            } else {
                                Public.ajaxPrompt(res.msg);
                            }

                        })
                }
            },
            // 修改生活问卷的数据进行分页
            editquestiondata(data) {
                var that = this;
                that.pagetotlearr = [];
                // 获取会员健康信息
                var xuhao = 0,
                    pagebreaksindexarr = [];
                // 制作分页符数组pagebreaksindexarr（获得用于截取questionnaireresultdetailList数组分成几页的索引）以及隐藏描述题目和分页符题目的序号
                $.each(data, function(index, el) {
                    if (el.subjectAnswerType == "99") {
                        pagebreaksindexarr.push(index);
                    }
                    if (el.subjectAnswerType == "05" || el.subjectAnswerType == "99") {
                        el.xuhao = ""
                    } else {
                        xuhao++;
                        el.xuhao = (xuhao) + "、"
                    }
                    el.ishow = false;
                });
                //头部添加索引0和尾部添加100是为了使用slice函数截取数组
                pagebreaksindexarr.unshift(0);
                pagebreaksindexarr.push(100);
                // 有几个页面pagetotle
                for (var i = 0; i < pagebreaksindexarr.length - 1; i++) {
                    var pagebreakstemobj = {
                        start: pagebreaksindexarr[i],
                        end: pagebreaksindexarr[i + 1],
                    };
                    that.pagetotlearr.push(pagebreakstemobj);
                }
                var question2 = data.slice(pagebreaksindexarr[0], pagebreaksindexarr[1]);
                // 修改显示当前分页的数据的属性ishow
                $.each(question2, function(index, el) {
                    el.ishow = true
                });
                // 然后再把data的对应的数据用修改了的数据替换掉
                $.each(data, function(index, el) {
                    $.each(question2, function(index2, el2) {
                        if (el.subjectId == el2.subjectId) {
                            el = el2;
                        }
                    });
                });

                return data
            },
            //获取患者健康信息
            getHealthInfomethod(item) {
                var  that = this;
                that.steptwoformdata.questionnaireresultdetailList = [];
                that.steptwoformdata.chroniclevel = [];
                that.steptwoformdata.patientpersonalindexList = [];
                that.addmpatientpersonalindexList = [];
                $.when(Public.commonajax("coms.commonChronicService", "getHealthInfo", "['" + item.person.mpiId + "']"))
                    .done(function(res) {
                        if (res.code = 200) {
                            res.body.mpiId = item.person.mpiId;
                            res.body.questionnaireresultdetailList = that.editquestiondata(res.body.questionnaireresultdetailList)
                            that.steptwoformdata = res.body;
                        }


                    })
            },

            // 增加慢病
            add_mdisease(item) {
                $("#add_mdisease").modal("show");
                var that = this;

                that.addmchronicid = "";
                // that.steptwoformdata.mpiId = item.person.mpiId;
                that.getHealthInfomethod(item)

            },
            // 提交新增慢病
            addmdisease(res) {
                var that = this;
                this.steptwoformdata.chroniclevel.push(that.addmchronicobj);
                var tem_monitorindicator = [];
                var concatdata = [];
                for (var i = 0; i < that.steptwoformdata.patientpersonalindexList.length; i++) {
                    that.steptwoformdata.patientpersonalindexList[i].biaoshi = "ok";
                    tem_monitorindicator.push(that.steptwoformdata.patientpersonalindexList[i]);
                }
                concatdata = tem_monitorindicator.concat(that.addmpatientpersonalindexList);
                that.steptwoformdata.patientpersonalindexList = Public.arrunique(concatdata, "indexId");
                // 提交新增慢病信息
                $.when(Public.commonajax("coms.commonChronicService", "saveHealthInfo", '[' + JSON.stringify(this.steptwoformdata) + ']'))
                    .done(function(res) {
                        if (res.code == 200) {
                            Public.ajaxPrompt("提交成功");

                        } else {

                            Public.ajaxPrompt(res.msg)
                        }
                        $("#add_mdisease").modal("hide");
                    })
            },

            // 单选的选项是否被选中
            rdioisSelected(subitem, options) {
                // console.log(subitem);
                $.each(options, function(index, el) {
                    el.selected = false;
                });
                subitem.selected = true;
                // console.log(options);
            },

            // 多选的选项是否被选中
            checkboxisSelected(subitem, options) {

                subitem.selected = !subitem.selected;
                // console.log(options)
            },
            //获取鼠标点击位置相对屏幕左上角的坐标
            getMousePos(event) {
                var e = event || window.event;
                var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
                var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
                var x = e.pageX || e.clientX + scrollX;
                var y = e.pageY || e.clientY + scrollY;

                this.styleObject = {
                    'left': x + 'px',
                    'top': y + 'px'
                }
            },
            //服务设置的显示和隐藏
            toggleshow(item, event) {
                var that = this;
                this.getMousePos(event);
                $("#fw_set").show();
                $(".bg_master2").show();
                // $(event.target).siblings(".fw_set").toggleClass('none');
                that.servicesetsub.objectId = that.currentDocId;
                that.servicesetsub.servicedObjectId = item.person.mpiId;

                $.when(Public.commonajax("coms.serviceOpenService", "queryObjectTypeCredentials", "['" + '031' + "']"))
                    .done(function(res) {
                        if (res.code == 200) {
                            $.each(res.body, function(index, el) {
                                el.servicedObjectType = "041";
                                el.servicedObjectId = item.person.mpiId;
                                el.freeFlag = 0;
                                el.effectiveFlag = 0;
                            });
                            that.servicesetlist = res.body;
                            $.when(Public.commonajax("coms.serviceOpenService", "queryServiceDirectOpen", '[' + JSON.stringify(that.servicesetsub) + ']'))
                                .done(function(res2) {

                                    if (res2.code == 200) {
                                        if (res2.body.length > 0) {
                                            $.each(that.servicesetlist, function(index, el) {
                                                $.each(res2.body, function(index2, el2) {
                                                    if (el.serviceId == el2.serviceId) {
                                                        that.servicesetlist.$set(index, el2)
                                                    }
                                                });
                                            });
                                            that.servicesettext = "";
                                        } else {
                                            that.servicesettext = "未做过设置"
                                        }


                                    } else {
                                        Public.ajaxPrompt(res.msg)
                                    }

                                })

                        } else {
                            Public.ajaxPrompt(res.msg);
                        }

                    })
            },
            //服务设置的保存
            servicesetsave() {

                var that = this;
                $.when(Public.commonajax("coms.serviceOpenService", "saveServiceOpen", '[' + JSON.stringify(that.servicesetlist) + ']'))
                    .done(function(res) {
                        if (res.code == 200) {
                            Public.ajaxPrompt("保存成功");
                            $("#fw_set").hide();
                            $(".bg_master2").hide();
                        } else {
                            Public.ajaxPrompt(res.msg)
                        }

                    })
            },
            // 点击按钮取消免费资讯
            // changeselected(subitem) {
            //         subitem.freeFlag = "0"
            //     },
            //设置健康顾问弹框
            toggleshow2(event) {
                $(event.target).siblings(".jkgw_set").toggleClass('none');
            },


            // 弹出复查和复诊
            reviewvisit(item) {

                $("#reviewvisit").modal('show');
                this.reviewvisitlist.mpiId = item.person.mpiId;
                this.getreviewvist(this.reviewvisitlist.mpiId)
            },
            // 获取复查和复诊列表数据
            getreviewvist(mpiId) {
                var that = this;
                $.when(Public.commonajax("coms.reviewService", "getReviewrecordList", "['" + mpiId + "']"))
                    .done(function(res) {
                        if (res.code == 200) {
                            that.reviewvisitlist.visitReview1 = res.body.visitReview1;
                            that.reviewvisitlist.visitReview2 = res.body.visitReview2;
                            if (that.reviewvisitlist.visitReview1.length == 0) {
                                var temobj1 = {
                                    "visitReview": "1",
                                    "reviewTime": ""
                                };
                                that.reviewvisitlist.visitReview1.push(temobj1)
                            }
                            if (that.reviewvisitlist.visitReview2.length == 0) {
                                var temobj2 = {
                                    "visitReview": "2",
                                    "reviewTime": "",
                                    "indicatorId": 0,
                                    "indicatorName": ""
                                };
                                that.reviewvisitlist.visitReview2.push(temobj2)
                            }

                        }

                    })

            },
            // 复查和复诊保存
            reviewvisitsave() {
                var that = this;
                if (that.reviewvisitlist.visitReview1[0].reviewTime == "" && that.reviewvisitlist.visitReview2[0].reviewTime == "") {
                    Public.ajaxPrompt("复诊和复查至少选一项");
                    return
                }
                // 保存的时候visitReview1或者visitReview2没录值的话需要传空数组为参数
                if (that.reviewvisitlist.visitReview1[0].reviewTime == "") {
                    that.reviewvisitlist.visitReview1 = []
                }
                if (that.reviewvisitlist.visitReview2[0].reviewTime == "") {
                    that.reviewvisitlist.visitReview2 = []
                }


                $.when(Public.commonajax("coms.reviewService", "saveReviewrecordList", "[" + JSON.stringify(that.reviewvisitlist) + "]"))
                    .done(function(res) {
                        if (res.code == 200) {
                            Public.ajaxPrompt("保存成功");
                            $("#reviewvisit").delay(2000).hide(0);
                            // 获取复查和复诊列表数据
                            that.getreviewvist(that.reviewvisitlist.mpiId);
                        } else {
                            Public.ajaxPrompt(res.msg);
                            if (that.reviewvisitlist.visitReview1.length == 0) {
                                var temobj1 = {
                                    "visitReview": "1",
                                    "reviewTime": ""
                                };
                                that.reviewvisitlist.visitReview1.push(temobj1)
                            }
                        }

                    })
            },
            cancledataconfirm(item, event, index) {
                if (item.dataRecordId) {
                    $(event.target).next(".confirmdiv").show();
                } else {
                    if (item.visitReview == 2) {
                        this.reviewvisitlist.visitReview2.splice(index, 1);
                        if (this.reviewvisitlist.visitReview2.length == 0) {
                            var temobj2 = {
                                "visitReview": "2",
                                "reviewTime": "",
                                "indicatorId": 0,
                                "indicatorName": ""
                            };
                            this.reviewvisitlist.visitReview2.push(temobj2)
                        }
                    } else {
                        this.reviewvisitlist.visitReview1.splice(index, 1);
                        if (this.reviewvisitlist.visitReview1.length == 0) {
                            var temobj1 = {
                                "visitReview": "1",
                                "reviewTime": ""
                            };
                            this.reviewvisitlist.visitReview1.push(temobj1)
                        }
                    }
                }

            },
            cancelsave(event) {
                $(event.target).closest('.confirmdiv').hide();

            },
            oksave(item, event) {
                var that = this;
                $(event.target).closest('.confirmdiv').hide();
                $.when(Public.commonajax("coms.reviewService", "deleteReviewrecord", "[" + item.dataRecordId + "]"))
                    .done(function(res) {
                        if (res.code == 200) {
                            Public.ajaxPrompt("保存成功");
                            // 获取复查和复诊列表数据
                            that.getreviewvist(that.reviewvisitlist.mpiId);
                        }

                    })
            },
            uselaydate(event, item) {
                var that = this;
                laydate({
                    elem: '#' + $(event.target).attr("id"),
                    min: laydate.now(), //设定最小日期为当前日期
                    choose: function(datas) { //选择日期完毕的回调
                        item.reviewTime = datas;
                    }
                });
            },

            addcheck() {
                var temobj = {
                    "visitReview": "2",
                    "indicatorId": 0,
                    "indicatorName": "",
                    "reviewTime": ""
                };
                this.reviewvisitlist.visitReview2.push(temobj)


            },
            //分页符点击效果
            pageclick(item, event) {
                // 所有数据显示属性ishow = false
                $.each(this.steptwoformdata.questionnaireresultdetailList, function(index, el) {
                    el.ishow = false
                });
                $(event.target).addClass('activecur').siblings('li').removeClass('activecur');
                var question2 = this.steptwoformdata.questionnaireresultdetailList.slice(item.start, item.end);
                $.each(question2, function(index, el) {
                    el.ishow = true
                });
                $.each(this.steptwoformdata.questionnaireresultdetailList, function(index, el) {
                    $.each(question2, function(index2, el2) {
                        if (el.subjectId == el2.subjectId) {
                            el = el2;
                        }
                    });
                });
            },
            // vip入会和续费弹框
            vipmembershipmtd(item, event) {
                var that = this;
                that.memberTypelist = that.memberTypelist2
                $("#jionvip").modal("show");
                this.jionvipsub = {
                    "mpiId": "",
                    "memberType": "",
                    "totalFee": "",
                    "doctorId": "",
                    "payType": "", //支付类型 字典:base_payMethod
                    "memberJoinDate": Public.formatDate(),
                };
                this.jionvipsub.mpiId = item.person.mpiId;
                this.jionvipsub.payType = that.paytypelist[0].key; //设置第一个付款方式
                if ($(event.target).text() == "VIP入会") {
                    that.memberTypelist = that.memberTypelist.filter(function(el) {
                        return el.memberType != item.memberList.typeList[0].memberType;
                    });
                    this.jionvipsub.memberType = that.memberTypelist[0].memberType; //设置第一个会员类型
                    this.jionvipform = true;
                    if (item.healthDoctor) {
                        that.jionvipsub.doctorId = item.healthDoctor[0].doctorId;
                    } else {
                        that.jionvipsub.doctorId = that.currentDocId; //设置当前医生为默认
                    }

                    $("#vipmemdatecon").show(); //解决时间插件错位的问题
                } else {
                    this.jionvipsub.memberType = item.memberList.typeList[0].memberType;
                    this.jionvipform = false;
                    $.when(Public.commonajax("coms.memberService", "findMemberDetail", "['" + this.jionvipsub.mpiId + "']"))
                        .done(function(res) {
                            if (res.code == 200) {
                                that.memberName = res.body.memberName
                                that.dueDate = res.body.dueDate.substring(0, 10);
                            }

                        })
                    $("#vipmemdatecon").hide(); //解决时间插件错位的问题

                }

                this.jionviplook = {
                    title: $(event.target).text(),
                    certificateNo: item.person.certificate.certificateNo,
                    certificateTypeText: item.person.certificate.certificateTypeText,
                    dob: item.person.dob,
                    personName: item.person.personName,
                    phoneNo: item.person.phoneNo,
                    sexText: item.person.sexText,

                };

            },
            // 查看会员状况记录
            getpatientnotemtd(item) {
                this.$refs.patientnotepage.getlist(item);

            },
            // vip入会和续费保存
            vipmembershipsave() {
                var that = this;
                that.jionvipsub.totalFee = that.totalFee;
                $.when(Public.commonajax("coms.memberService", "memberJoinOnWeb", "[" + JSON.stringify(this.jionvipsub) + "]"))
                    .done(function(res) {
                        if (res.code == 200) {
                            Public.ajaxPrompt("保存成功");
                            // 获取复查和复诊列表数据
                            $("#jionvip").modal("hide");
                            that.refresh();
                        }

                    })
            },
            handclose2() {
                $("#fw_set").hide();
                $(".bg_master2").hide();
            },
            // 验证hh:mm的方法
            validhhmm(value) {
                var reg = /^(?:2[0-3]|[01]?[0-9]):[0-5][0-9]$/g;
                return reg.test(value)
            },
            //回访安排弹框
            revisitschedulemodel(item) {
                var that = this;
                $("#revisitschedule").modal('show');
                $.when(Public.commonajax("coms.revisitService", "findRevisitPlan", "['" + item.person.mpiId + "']"))
                    .done(function(res) {
                        if (res.code == 200) {
                            var temtextarr = [];
                            $.each(res.body.chronicList, function(index, el) {
                                temtextarr.push(el.chronicText);
                            });
                            var temtex = temtextarr.join("、");
                            res.body.revisitDate = res.body.revisitDate.substring(0, 10);
                            res.body.chronicText = temtex;
                            that.revisitscheduledata = res.body;
                        }

                    })
            },
            //回访安排保存
            revisitschedulesave() {
                var validBeginvalue = this.validhhmm(this.revisitscheduledata.revisitBeginTime);
                var validEndvalue = this.validhhmm(this.revisitscheduledata.revisitEndTime);
                if (validBeginvalue && validEndvalue) {
                    $.when(Public.commonajax("coms.revisitService", "saveRevisitPlan", "[" + JSON.stringify(this.revisitscheduledata) + "]"))
                        .done(function(res) {
                            if (res.code == 200) {
                                Public.ajaxPrompt("保存成功");
                                $("#revisitschedule").modal('hide');
                            }
                        })
                } else {
                    Public.ajaxPrompt("请输入正确的时间格式");
                }

            },
            //回访记录弹框
            revisitrecordmodel(item) {
                this.$refs.revisitrecordmodel.revisitrecordmodel(item.person.mpiId);
            },
            //就诊安排
            patientvisitplan(item) {
                $("#patientvisitplan").modal('show');
                this.mpiidtohdp = item.person.mpiId
                this.patientname = item.person.personName
            },
            resetmodal() {
                this.changeView("请选择医院");
                $("#patientvisitplan").modal("hide");
            },
            //用药提醒列表弹框
            saveremindmodal(item, event) {
                var that = this;
                this.curRemindmpiId = item.person.mpiId;
                $("#medicationreminderlist").modal("show");
                this.getcurRemindlist();
            },
            //获取当前患者的用药提醒列表列表
            getcurRemindlist() {
                var that = this;
                $.when(Public.commonajax("base.drugRemindService", "getDrugRemindInfoList", `['${this.curRemindmpiId}','1']`))
                    .done(function(res) {
                        if (res.code == 200) {
                            that.DrugRemindList = res.body;

                        }
                    })
            },
            //用药提醒新增或者修改弹框
            editremindmodal(item) {
                var that = this;
                $("#medicationreminder").modal("show");
                if (item) {
                    this.remindsavedata = item;
                    this.iseditoradd=true;
                } else {
                    this.iseditoradd=false;
                    this.remindsavedata = {
                        "mpiId": this.curRemindmpiId,
                        "everyDayFrequency": "1", //每日频次
                        "quantityEveryTime": "", //每次用量
                        "remindFlag": "1",
                        "remindAdvance": "5",
                        "remindStyle": "01",
                        "drugremindTimesList": [{
                            "remindTime": this.getcurHandM()
                        }],
                        "drugName": "",

                    }
                }

            },
            //用药提醒保存
            saveremind() {
                var that = this;
                $.when(Public.commonajax("base.drugRemindService", "saveDrugRemind", "[" + JSON.stringify(this.remindsavedata) + "]"))
                    .done(function(res) {
                        if (res.code == 200) {
                            Public.ajaxPrompt("保存成功");
                            $("#medicationreminder").modal("hide");
                            that.getcurRemindlist();
                        } else {
                            Public.ajaxPrompt(res.msg);
                        }
                    })
            },
            closeeditremindmodal() {
                $("#medicationreminder").modal("hide");
                this.getcurRemindlist();
            },
            //用药提醒时间选择确认
            getHM() {
                var temobj = {
                    remindTime: this.selectedH + ':' + this.selectedM
                }
                this.remindsavedata.drugremindTimesList.$set(this.remindTimeindex, temobj);
                $("#selectedHM").modal("hide");
            },
             //用药提醒时间选择弹框
            slectedtime(sitem, sindex) {
                $("#selectedHM").modal("show");
                this.selectedH=sitem.remindTime.substring(0,2);
                this.selectedM=sitem.remindTime.substring(3);
                console.log(this.selectedH+':'+this.selectedM)
                this.remindTimeindex = sindex;
            },
            //删除用药提醒
            deleremindmodal(item) {
                $("#deleremindmodal").modal("show");
                this.curdeleremindid = item.drugRemindId

            },
            confirmdeleremind() {
                var that = this;
                $.when(Public.commonajax("base.drugRemindService", "deleteDrugRemind", "['" + this.curdeleremindid + "']"))
                    .done(function(res) {
                        if (res.code == 200) {
                            Public.ajaxPrompt("删除成功");
                            $("#deleremindmodal").modal("hide");
                            that.getcurRemindlist();
                        }
                    })
            },
            canceldeleremind() {
                $("#deleremindmodal").modal("hide");
            },
            getcurHandM() {
                var curdate = new Date(),
                    curh = curdate.getHours() > 9 ? curdate.getHours() : '0' + curdate.getHours(),
                    curm = curdate.getMinutes() > 9 ? curdate.getMinutes() : '0' + curdate.getMinutes();
                    return  curh + ':' + curm
            },

            //体检预约
            medicalAppointments (item) {
                this.mpiIds = item.person.mpiId;
                $('#medicalAppointment').modal('show');
                this.$refs.medicalappos.isAppo = false;
                $('#date-appo').val('');
            },

            //体检预约记录
            medicalAppointmentsDemand (item) {
                //this.mpiIds = item.person.mpiId;
                $('#medicalAppointmentDemand').modal('show');
                this.$refs.medicalrecord.getSetMealList(item.person.mpiId);
            },

            //体检报告
            medicalReportDemand (item) {
                //this.mpiIds = item.person.mpiId;
                $('#medicalReportDemand').modal('show');
                this.$refs.medicalreportdemand.getSetMealList(item.person.mpiId);
                // let temporary = '551445c27d8148219b4ce68905bcf90f';
                // this.$refs.medicalreportdemand.getSetMealList(temporary)
            }

    },

    events: {
        'planconfirmok' () {
            $("#patientvisitplan").modal("hide");
            this.changeView("请选择医院");
        },

        // 分页组件传回的表格数据
        'data' (data) {
            var that = this;
            var d = new Date();
            var year = d.getFullYear();
            $.each(data, function(index, el) {
                    el.person.dob = parseInt(year) - parseInt(el.person.dob.substring(0, 4));
                    el.ishow4 = false; //判断更多按钮的显示和隐藏
                })
            if (that.login_roleId == "main_doctor") {
                for (var i = 0; i < data.length; i++) {

                    for (var j = 0; j < data[i].mainDoctorList.length; j++) {
                        if (data[i].mainDoctorList[j].doctorId == this.currentDocId) {
                            data[i].ishow = true; //判断当前登录账号是否是该患者的主管医生，是电话就显示对应
                        }
                    }
                }
            } else if (that.login_roleId == "health_doctor") {

                for (var e = 0; e < data.length; e++) {
                    if (data[e].healthDoctor) {
                        var ishealthdoc = data[e].healthDoctor.some(function(element, index) {
                            return element.doctorId == that.currentDocId
                        })
                    }

                    if (data[e].healthDoctor && ishealthdoc) {
                        data[e].ishow3 = true; //判断当前登录账号是否是该患者的健康顾问,是就显示会员修改不是就不显示会员修改
                    }
                    var isvip = data[e].memberList.typeList.some(function(element, index) {
                        return element.memberType != 1
                    });
                    if (isvip) {
                        data[e].ishow2 = true;
                        data[e].ishow5 = true; // 判断该患者的会员类型是否属于除普通会员的其他类型，然后显示VIP续费
                    }

                }

            } else {
                for (var n = 0; n < data.length; n++) {
                    data[n].ishow = true; //判断慢病医生才显示的按钮

                    var isvip = data[n].memberList.typeList.some(function(element, index) {
                        return element.memberType != 1
                    });
                    if (isvip) {
                        data[n].ishow2 = true; //判断慢病医生的会员类型 判断是否显示设置健康顾问
                    }
                    // for (var m = 0; m < data[n].memberList.typeList.length; m++) {
                    //     if (data[n].memberList.typeList[m].memberType == 2) {
                    //         data[n].ishow2 = true;//判断慢病医生的会员类型 判断是否显示设置健康顾问
                    //     }
                    // }

                }
            }
            that.tableList = data;
            console.log(JSON.stringify(that.tableList))
            // console.log(that.tableList);
            this.$nextTick(function() {
                $("#memberlist .operationtd").find("div:gt(6)").hide();
                var operationtdhtm = $("#memberlist .operationtd");
                $.each(operationtdhtm, function(index, el) {
                    if (el.childElementCount > 7) { //大于7 是因为要减去更多这个按钮
                        that.tableList[index].ishow4 = true; //判断更多按钮的显示和隐藏
                    } else {
                        that.tableList[index].ishow4 = false; //判断更多按钮的显示和隐藏
                    }
                });
            });
        },
    },
    // 处理值的传递
    watch: {
        'addmchronicid': function(value, oldvalue) {
            // 根据慢病id查询监测目标
            var that = this;
            var isrepeat = true;
            $.each(that.steptwoformdata.chroniclevel, function(index, el) {
                if (el.chronic == value) {
                    isrepeat = false;
                    Public.ajaxPrompt("不能选择重复慢病");
                    // alert("不能选择重复慢病")
                }
            });

            if (value && isrepeat) {
                $.when(Public.commonajax("coms.commonChronicService", "findChronicMonitorIndicatorByChronic", "[" + value + "]"))
                    .done(function(responsebale) {
                        var data = responsebale.body;
                        that.addmpatientpersonalindexList = data
                        that.addmchronicobj = {
                            "chronic": value
                        };

                    })
            }

        },
        'search.searchformdata.mainDoctorname': function(value, oldvalue) {
            if (value == "") {
                this.search.searchformdata.mainDoctor = ""
            }
        },
        'jionvipsub.memberType': function(value, oldvalue) {
            var that = this;
            $.each(this.memberTypelist, function(index, el) {
                if (el.memberType == value) {
                    that.memberTypeprice = el
                }
            });

        },
        //监听用药提醒的每日频次
        'remindsavedata.everyDayFrequency': function(value, oldvalue) {
            var cha = parseInt(value) - parseInt(oldvalue);

            if (cha > 0 && this.remindsavedata.drugremindTimesList.length != this.remindsavedata.everyDayFrequency) {
                var temobj = {
                    remindTime: this.getcurHandM(),
                }

                for (var i = 0; i < cha; i++) {
                    this.remindsavedata.drugremindTimesList.push(temobj);
                }


            }
            if (cha < 0 && this.remindsavedata.drugremindTimesList.length != this.remindsavedata.everyDayFrequency) {
                cha = Math.abs(cha);
                for (var i = 0; i < cha; i++) {
                    this.remindsavedata.drugremindTimesList.pop(temobj);
                }

            }
        },
    },
}
$(function() {
    //慢病和主管医生的关联选择
    $("#jbbz").on('change', function(event) {
        // event.preventDefault();
        var ld_index = $("#jbbz").get(0).selectedIndex;
        $("#oldMangerobj").get(0).selectedIndex = ld_index;
    });

    // 搜索位置主管医生的下拉
    $("#zhuguanyis").find('input').on('click', function(event) {
        event.preventDefault();
        $(".yishenglist").show();
    });
})
</script>
<style scoped>
/*会员修改*/

#search select.form-control {
    display: inline-block;
    margin-top: 10px
}

.twostep_1,
.twostep_2,
.twostep_3 {
    border: 1px solid #d3d3d3;
    width: 760px;
    margin: 20px auto 0;
    padding-top: 20px;
    position: relative;
}

.twostep_3 {
    margin-bottom: 20px
}

.twostep_3 .subjectWrap {
    display: block
}

.twostep_3 .radio .subjectWrap:nth-child(1) {
    margin-left: 10px
}

.twostep_3 .form-group {
    margin-left: 30px;
    margin-right: 30px;
}

.twostep_3 .subjectContent {
    font-weight: bold;
    padding: 0 10px 5px
}

.twostep_3 .radio,
.twostepform .checkbox {
    padding-left: 30px;
}


/*.twostep_3 .radio input,
.twostepform .checkbox  input{
  width: 20px; height: 20px
}*/

.twostep_3 .radio span,
.twostepform .checkbox span {
    margin-left: 10px;
    margin-top: 3px;
    display: inline-block;
}

.twostep_3 textarea,
.twostepform input.text {
    margin-left: 30px;
    border: 1px solid #ccc;
    width: 90%
}

.twostepform input[type="text"],
textarea {
    padding: 10px
}

.twostepform input[type="radio"],
.twostepform input[type="checkbox"] {
    height: 20px;
    width: 20px;
    background: url(../../assets/img/radio.png) no-repeat center center;
}

.twostepform input[type="radio"]:checked {
    background: url(../../assets/img/radiochecked.png) no-repeat center center;
}

.twostepform p {
    padding-top: 7px;
}

.form-horizontal .radio,
.form-horizontal .radio-inline {
    padding-top: 2px;
}

.twostep h4 {
    background: #fff;
    width: 80px;
    text-align: center;
    padding: 0 10px;
    color: #bbbbbb;
    position: absolute;
    font-size: 12px;
    height: 30px;
    line-height: 30px;
    top: -15px;
    left: 50px;
}


/*会员列表*/

.memberlist {
    padding: 20px
}

.memberlist table p {
    line-height: 26px;
}

.memberlist table img {
    display: block;
    margin: 10px auto 0;
    border-radius: 50%
}

.memberlist table p button {
    border: 1px solid #1dc499;
    color: #1dc499;
    padding: 1px 8px;
    margin-left: 10px;
    cursor: default;
}

.btn-default:hover,
.btn-default:focus,
.btn-default.focus,
.btn-default:active,
.btn-default.active {
    background-color: #fff;
}

.memberlist table p button.vip {
    border: 1px solid #ff8c68;
    color: #ff8c68;
    padding: 1px 8px;
    margin-left: 10px;
}

.memberlist table a {
    display: inline-block;
    color: #78909c;
    height: 26px;
    line-height: 26px;
    margin-left: 15px;
}

.memberlist table td p span {
    display: inline-block;
    margin-left: 10px;
    height: 20px;
}

.memberlist table td p span:hover {
    cursor: default;
}

.memberlist table .operationtd>div {
    display: inline-block;
    margin-left: 10px;
    height: 40px;
    float: left;
    width: 110px;
    cursor: pointer;
}

.memberlist table td .name {
    font-weight: bold;
}

.memberlist table td .female {
    background: url(../../assets/img/female.png) no-repeat left center;
    padding-left: 20px;
}

.memberlist table td .male {
    background: url(../../assets/img/male.png) no-repeat left center;
    padding-left: 20px;
}

.memberlist table td .iphone {
    background: url(../../assets/img/iphone.png) no-repeat left center;
    padding-left: 20px;
}

.memberlist table td .infoedit {
    background: url(../../assets/img/jsszy/信息修改.png) no-repeat left center;
    padding-left: 25px;
    height: 26px;
    line-height: 26px;
}

.memberlist table td .change {
    background: url(../../assets/img/change.png) no-repeat left center;
    padding-left: 25px;
    height: 26px;
    line-height: 26px;
}

.memberlist table td .addmb {
    background: url(../../assets/img/addmb.png) no-repeat left center;
    padding-left: 25px;
    height: 26px;
    line-height: 26px;
}

.memberlist table td .fucha {
    background: url(../../assets/img/jsszy/就诊安排.png) no-repeat left center;
    padding-left: 25px;
    height: 26px;
    line-height: 26px;
}

.memberlist table td .heart {
    background: url(../../assets/img/jsszy/爱心.png) no-repeat left center;
    padding-left: 25px;
    height: 26px;
    line-height: 26px;
}

.memberlist table td .comment {
    background: url(../../assets/img/jsszy/爱心.png) no-repeat left center;
    padding-left: 25px;
    height: 26px;
    line-height: 26px;
}

.memberlist table td .jiuzhen {
  background: url(../../assets/img/jsszy/就诊安排.png) no-repeat left center;
  padding-left: 25px;
  height: 26px;
  line-height: 26px;
}
.memberlist table td .tijian {
  background: url(../../assets/img/jsszy/体检预约.png) no-repeat left center;
  padding-left: 25px;
  height: 26px;
  line-height: 26px;
}
.memberlist table td .vipmembership {
    background: url(../../assets/img/vipmembership.png) no-repeat left center;
    padding-left: 25px;
    height: 26px;
    line-height: 26px;
}

.memberlist table td .viprenew {
    background: url(../../assets/img/viprenew.png) no-repeat left center;
    padding-left: 25px;
    height: 26px;
    line-height: 26px;
}

.memberlist table td .doctor {
    font-size: 12px;
    color: #999
}

.memberlist table td .name {
    font-weight: bold;
}

.memberlist table tr {
    border: none;
    border-bottom: #e9eef3 1px solid
}

.memberlist table a:hover {
    cursor: pointer;
}

.memberlist table td {
    border: none;
}

.memberlist table tr td:nth-child(1) {
    width: 80px
}

.memberlist table tr td:nth-child(2) {
    width: 370px
}

.memberlist table tr td:nth-child(3) {
    padding: 10px 100px 0 0;
}

.form-horizontal .radio-inline {
    padding-top: 1px
}

.form-horizontal p {
    padding-top: 7px
}

.mb20 {
    margin-bottom: 20px;
}

.memberlist form.cbafter .fl {
    width: 850px
}

.memberlist form.cbafter label {
    font-weight: normal;
    color: #999
}

.memberlist form.cbafter input,
.memberlist form.cbafter select {
    display: inline-block;
    width: 115px;
    border: none;
    border-bottom: 1px dashed #ccc;
    box-shadow: none;
    color: #333
}

.memberlist form.cbafter input:nth-of-type(2),
.memberlist form.cbafter input:nth-of-type(6) {
    width: 180px;
}

.memberlist form.cbafter input:nth-of-type(4),
.memberlist form.cbafter input:nth-of-type(8) {
    width: 80px;
}

.memberlist form.cbafter .fr button {
    display: block;
    margin: 20px auto;
}

/*.dropdown-menu>li>a{background: }*/

#fw_set {
    display: none
}

.fw_set,
.jkgw_set {
    position: absolute;
    top: 32px;
    z-index: 100;
    width: 300px;
    left: 0;
    height: auto;
    -webkit-box-shadow: 0 0 10px rgba(230, 230, 230, .9);
    -moz-box-shadow: 0 0 10px rgba(230, 230, 230, .9);
    box-shadow: 0 0 10px rgba(230, 230, 230, .9);
    background: #fff;
    border-radius: 10px;
    padding: 10px 0
}

.fw_set {
    z-index: 11
}

.fw_set h3 {
    line-height: 30px;
    font-size: 16px;
    text-align: center;
    color: #9E3110
}

.fw_set span {
    display: inline-block;
    width: 60px;
    height: 44px;
    line-height: 44px
}

.jkgw_set li {
    background: url(../../assets/img/jsszy/爱心.png) no-repeat 10px center;
    padding-left: 35px;
    height: 36px;
    line-height: 36px;
    text-align: left;
}

.jkgw_set li.active {
    color: #1dc499;
}


/*按钮开关*/

.chk_3 {
    display: none;
}

.chk_3 + label {
    background-color: #fafbfa;
    padding: 9px;
    border-radius: 50px;
    display: inline-block;
    position: relative;
    margin-right: 30px;
    -webkit-transition: all 0.1s ease-in;
    transition: all 0.1s ease-in;
    width: 80px;
    height: 30px;
}

.chk_3 + label:after {
    content: ' ';
    position: absolute;
    top: 0;
    -webkit-transition: box-shadow 0.1s ease-in;
    transition: box-shadow 0.1s ease-in;
    left: 0;
    width: 80px;
    height: 30px;
    border-radius: 100px;
    box-shadow: inset 0 0 0 0 #eee, 0 0 1px rgba(0, 0, 0, 0.4);
}

.chk_3 + label:before {
    content: ' ';
    position: absolute;
    background: white;
    top: 1px;
    left: 1px;
    z-index: 999999;
    width: 28px;
    -webkit-transition: all 0.1s ease-in;
    transition: all 0.1s ease-in;
    height: 28px;
    border-radius: 100px;
    box-shadow: 0 3px 1px rgba(0, 0, 0, 0.05), 0 0px 1px rgba(0, 0, 0, 0.3);
}

.chk_3:active + label:after {
    box-shadow: inset 0 0 0 20px #eee, 0 0 1px #eee;
}

.chk_3:active + label:before {
    width: 37px;
}

.chk_3:checked:active + label:before {
    width: 37px;
    left: 20px;
}

.chk_3 + label:active {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), inset 0px 1px 3px rgba(0, 0, 0, 0.1);
}

.chk_3:checked + label:before {
    content: ' ';
    position: absolute;
    left: 52px;
    border-radius: 100px;
}

.chk_3:checked + label:after {
    content: ' ';
    font-size: 1.5em;
    position: absolute;
    background: #EDC1B6;
    box-shadow: 0 0 1px #EDC1B6;
}

.checkboxFive {
    width: 25px;
    margin: 10px;
    position: relative;
    display: inline-block;
}

.checkboxThree {
    width: 80px;
    height: 30px;
    margin: 10px;
    display: inline-block;
    float: left
}

.checkboxFive label {
    cursor: pointer;
    position: absolute;
    width: 20px;
    height: 20px;
    top: 0;
    left: 0;
    background: #fff;
    border: 1px solid #ddd;
}

.checkboxFive input[disabled]+label {
    background: #eee;
}

.checkboxFive label:after {
    opacity: 0;
    content: '';
    position: absolute;
    width: 9px;
    height: 5px;
    background: transparent;
    top: 6px;
    left: 5px;
    border: 2px solid #1dc499;
    border-top: none;
    border-right: none;
    -webkit-transform: rotate(-45deg);
    -moz-transform: rotate(-45deg);
    -o-transform: rotate(-45deg);
    -ms-transform: rotate(-45deg);
    transform: rotate(-45deg);
}

.checkboxFive label:hover::after {
    opacity: 0;
}

.checkboxFive input[type=checkbox]:checked + label:after {
    opacity: 1;
}

.checkboxFive input[type=checkbox]:checked + label {
    border: 1px solid #1dc499;
}

.tabcon {
    min-height: 450px;
}

.dingwei {
    position: relative;
}

#zhuguanyis {
    position: relative;
    display: inline-block;
}

#zhuguanyis .yishenglist {
    position: absolute;
    display: none;
    left: 80px;
    top: 32px;
    z-index: 9;
    width: 172px;
    height: 200px;
    overflow: auto;
    -webkit-box-shadow: 0 0 10px rgba(230, 230, 230, .9);
    -moz-box-shadow: 0 0 10px rgba(230, 230, 230, .9);
    box-shadow: 0 0 10px rgba(230, 230, 230, .9);
    background: #fff;
    border-radius: 0 0 10px 10px;
    padding: 10px
}

#zhuguanyis .yishenglist p {
    line-height: 26px;
    height: 26px;
    margin-top: 5px;
    background: #f1f1f1;
    padding-left: 10px
}

#zhuguanyis .yishenglist p:nth-child(1) {
    background: #1dc499;
    color: #fff
}

#memberlist .operationtd .more {
    position: absolute;
    right: 20px;
    top: 20px;
}

#memberlist .operationtd {
    position: relative;
}

button.save {
    color: #fff;
    padding: 5px 10px;
    border-radius: 17px;
    margin-top: 7px;
    border: none;
    width: 80px;
    background: #1DC499;
    display: block;
    margin: 0 auto;
}

.confirmdiv,
.confirmdiv2 {
    display: none
}

.ztlan {
    color: #9E3110
}

.toast3 {
    position: absolute;
    width: 160px;
    min-height: 80px;
    top: 0;
    left: 50%;
    margin-left: -80px;
    background-color: rgba(250, 250, 250, 1);
    text-align: center;
    border-radius: 5px;
    text-align: center;
    box-sizing: border-box;
    z-index: 100000000000000000;
}

.toast3>p {
    padding: 10px
}

.toast3>p:nth-child(1) {
    border-bottom: 1px solid #1DC499;
    line-height: 40px;
}

.toast3>p button:nth-child(2) {
    margin-left: 10px
}

.confirmdiv2 {
    position: absolute;
    bottom: 0px;
    right: 0;
    background: #fff;
    z-index: 100000000000000000;
}

.confirmdiv2 p {
    padding: 10px;
    width: 140px;
    height: 40px
}

.memberlist table .confirmdiv2 p button {
    border: none;
    color: #fff;
    display: inline-block;
    margin-left: 10px;
    float: left;
    cursor: pointer;
}

#updateplandetail {
    width: 200px
}


/*分页样式*/

.pagebreaks li {
    float: left;
    width: 30px;
    height: 30px;
    padding: 0 5px;
    border: 1px solid #ccc;
    line-height: 30px;
    text-align: center;
    margin-right: 10px;
}

.bgblue {
    background: #f1f1f1
}

.pagebreaks li:hover {
    cursor: pointer;
}

.pagebreaks li.activecur {
    background: #9E3110;
    color: #fff
}

.pagebreaks span {
    display: inline-block;
    margin-top: 5px;
}

button.canceldefault {
    display: block;
    height: 32px;
    line-height: 32px;
    width: 90px;
    border-radius: 16px;
    color: #fff;
    outline: none;
    background: #1dc499
}

.h60 {
    height: 60px;
    padding-top: 20px
}

#jionvip .modal-dialog {
    min-width: 800px;
}

#jionvip .modal-dialog .modal-body {
    padding: 30px;
}

.meminfo p {
    display: inline-block;
    line-height: 30px;
}

.meminfo p span {
    color: #9E3110
}

.meminfo p {
    width: 240px
}

.changeinfo_con {
    background: #FFFBF8;
    border-radius: 20px;
    width: 740px;
    min-height: 190px;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #eeeeee
}

.changeinfo {
    background: #fff;
    margin-bottom: 20px;
}

#payprice {
    background: url(../../assets/img/pricearrow.png) no-repeat 10px center;
    padding-left: 35px;
    padding-top: 15px;
}

#payprice .btn-group button {
    float: left;
    margin-bottom: 10px;
    color: #333;
    cursor: default;
}

#payprice .btn-group button:nth-child(1) {
    border-radius: 5px 0 0 5px;
    text-align: right;
    padding-right: 10px
}

#payprice .btn-group button:nth-child(2) {
    border-radius: 0 5px 5px 0;
    background: #fff;
    text-align: left;
    padding-left: 10px
}

#payprice .btn-group button.colororange {
    color: #FF9E4F
}

#payprice .btn-group button.orange {
    color: #fff
}

.memtype {
    padding-top: 60px
}

.memtype p {
    color: #FF9E4F;
    font-weight: bold;
}

#jionvip label {
    font-weight: normal;
}

.contype {
    padding-top: 20px
}

#jionvip label.lh26 {
    line-height: 26px;
}

.btngroup {
    background: #EFF8FD;
}

.btngroup button {
    width: 80px;
    margin: 10px 30px;
}

.memberinfo {
    padding: 0 20px 20px;
    bottom-border: 1px dotted #ccc
}

.memberinfo p {
    line-height: 34px;
    height: 34px;
    float: left;
    width: 33.33%;
}

.memberinfo span {
    color: #A9A9A9
}

.memberinfo>div {
    clear: both;
    line-height: 34px;
    height: 34px;
    padding-top: 10px;
}

#patientvisitplan .modal-content {
    min-height: 500px
}
.DrugRemindInfoList tr td ,.DrugRemindInfoList tr th{text-align:center}
.DrugRemindInfoList tr td .glyphicon {
    display: inline-block;
    width: 30px;
    height: 30px;
}

.DrugRemindInfoList tr td .glyphicon:hover {
    color: #1dc499;
    cursor: pointer;
}

#deleremindmodal .text-center {
    font-size: 16px
}

#deleremindmodal .centerbutton {
    width: 300px;
    margin: 0 auto;
}

#deleremindmodal .centerbutton button {
    display: inline-block;
}
.maxsix{float: left; width:80px;margin-left: 5px }
.DrugRemindInfoList .everyDayFrequency { background: url(../../assets/img/notification-bell02.png) no-repeat left 8px;background-size: auto 40%;padding-left: 20px}
.DrugRemindInfoList .everyDayFrequency span{margin-right: 10px}
.DrugRemindInfoList .everyDayFrequency span:last-child{margin-left: 0}

/*体检预约*/
#medicalAppointment .modal-dialog,#medicalAppointmentDemand .modal-dialog,#medicalReportDemand .modal-dialog{
    width: 80%;
}
</style>
